package com.fc.redis.service;

import com.fc.redis.entity.EPriceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class PriceService {
    public String str = "长沙黑马程序员";
    public String getStr() {
        return str;
    }
    @Transactional
    public String test2(){
        return null;
    }
    // IOC 实例化 对象时 会访问 无参 构造
    // 如果当前类有代理对象生成，不会访问构造函数，唯一的一次是IOC访问的
    public PriceService() {
        System.out.println("PriceService constractor");
    }
    //    public PriceService(){}
    public String testPrice(EPriceType type) {
        return null;
    }
}
